<?php
echo $_COOKIE["firstName"];
if (isset($_COOKIE["firstName"]))
{
    echo "Welcome ";
    echo $_COOKIE["firstName"];
}
else
{
     //echo"'<script>document.location.href='index.php'</script>'";
}


?>
